#!/usr/bin/env python
# coding=utf-8

from pyPdf import PdfFileWriter, PdfFileReader

def test():
    print(PdfFileWriter.__doc__)

    output = PdfFileWriter()
    input1 = PdfFileReader(open("./pic/girl.gif", "rb"))
    output.addPage(input1.getPage(0))
    outputStream = open("document-output.pdf", "wb")
    output.write(outputStream)


if __name__ == '__main__':
    import vavava.util,os
    log = vavava.util.initlog("./log/"+ os.path.split(__file__)[1]+".log")
    test()

